import { DbColumn } from './dbColumn'
import { DbForeignKey } from './dbForeignKey'
import { DbIndex } from './dbIndex'
import { DbPrimaryKey } from './dbPrimaryKey'
import { DbTable } from './dbTable'

/**
 * Describe a database model
 */
export interface DbDiffModel {
	/**
	 * The model tables
	 */
	diffTables: DbDiffTable[]

	/**
	 * new tables
	 */
	newTables: DbTable[]
}

/**
 * Describe a database diffrent model
 */
export interface DbDiffTable {
	/**
	 * The table name
	 */
	name: string

	/**
	 * new columns
	 */
	newColumns: DbColumn[]

	/**
	 * new foreign keys
	 */
	newForeignKeys: DbForeignKey[]

	/**
	 * new Index
	 */
	newIndexes: DbIndex[]

	/**
	 * new primary key
	 */
	newPrimaryKeys?: DbPrimaryKey
}
